/*
 * $Revision: 1.2 $ $Date: 2006/04/05 21:44:52 $
 *

 */
package org.vectrics.provider;

import org.apache.log4j.Logger;
import org.vectrics.hibernate.ThreadProperties;


/**
 * @author mmoore
 */
public abstract class ServiceProvider {
	private Logger log = Logger.getLogger(this.getClass());
    protected abstract String getServiceBeanCode();
    
    protected Object findServiceBean() {
    	log.info("findServiceBean()" +
    			"\r\n - code = " + this.getServiceBeanCode() +
    			"\r\n - app name = " + ThreadProperties.getApplicationContext().getName());
        Object service = ThreadProperties.getApplicationContext()
        		.getBeanFactory().getBean(getServiceBeanCode());
        return(service);
    }
    
}
